package cn.tsingyu.antsclub.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import cn.tsingyu.antsclub.interceptor.AuthInterceptor;
import cn.tsingyu.antsclub.interceptor.PermissionInterceptor;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {
	@Override
    public void addInterceptors(InterceptorRegistry registry) {  
		registry.addInterceptor(new AuthInterceptor()).excludePathPatterns("/","/login");
		registry.addInterceptor(new PermissionInterceptor()).excludePathPatterns("/","/login");
    } 
	
}
